<?php
header('content-type:text/html;charset=utf-8');
    $host = "http://sms.market.alicloudapi.com";
    $path = "/singleSendSms";
    $method = "GET";
    $appcode = "ab7bfa4f7d544241998ea5d8a8ddb028";
    $headers = array();
    array_push($headers, "Authorization:APPCODE " . $appcode);

    $arr = array('name'=>"小明",'num'=>'345345');
    $arr = json_encode($arr);
    $arr = urlencode($arr);
    // var_dump($arr);exit;
    $querys = "ParamString=".$arr."&RecNum=18925139194&SignName=学并思教育&TemplateCode=SMS_72205005";
    $bodys = "";
    $url = $host . $path . "?" . $querys;

    // var_dump($url);exit;

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    // curl_setopt($curl, CURLOPT_HEADER, true);
    if (1 == strpos("$".$host, "https://"))
    {
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    }
    var_dump(curl_exec($curl));
?>